function BrickView(jqInput) {
	this.jqInput = jqInput;

}

BrickView.prototype.init = function(controller) {
	this.controller = controller;

	this.jqInput.change(function() {
		controller.onSolutionGuess($(this).val());
	});
};

BrickView.prototype.onSolved = function() {
	this.jqInput.unbind();
	this.jqInput.attr('readonly', true);
	alert('Solved');
};

BrickView.prototype.onFail = function() {
	var input = this.jqInput;

	input.addClass('wrong');
	setTimeout(function() {
		input.removeClass('wrong');
		input.val('');
	}, 1000);
};